home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 25 / Mac Magazin and MacEasy Magazine CD - Issue 25.iso / Grafik & Text / BibTeX / Source code / StdPrefsLib / DebugUtils.h < prev    next >
Text File  |  1994-03-17  |  956b  |  48 lines

  1. /*
  2.     File:        DebugUtils.h
  3.  
  4.     Contains:    Helpful debugging macros.
  5.                 
  6.     Written by:    Jim Reekes
  7.  
  8.     Copyright:    © 1993-94 by Apple Computer, Inc.
  9.     
  10.     Change History (most recent first):
  11.     
  12. */
  13.  
  14. //-----------------------------------------------------------------------
  15.  
  16. #ifndef _DEBUGUTILS_
  17. #define _DEBUGUTILS_
  18.  
  19. #include <Types.h>
  20.  
  21. #include "CompileFlags.h"
  22.  
  23. //-----------------------------------------------------------------------
  24. // Macros
  25.  
  26. #ifdef DEBUG_IT
  27. #define FailMessage(cond, s)                                \
  28.     if (cond) {                                                \
  29.         DebugStr ((ConstStr255Param)"\p"#s);                \
  30.     }                                                        
  31. #else
  32. #define FailMessage(cond, s)                                \
  33.     ((void)    0)
  34. #endif DEBUG_IT
  35.  
  36. #ifdef DEBUG_IT
  37. #define DebugMessage(s)            DebugStr ((ConstStr255Param)"\p"#s)
  38. #else
  39. #define DebugMessage(s)            ((void)    0)
  40. #endif DEBUG_IT
  41.  
  42. //-----------------------------------------------------------------------
  43.  
  44. #endif _DEBUGUTILS_
  45.  
  46. //-----------------------------------------------------------------------
  47.  
  48.